package priv.pattern.decorator.subclass;

import priv.pattern.decorator.Coffee;

/*
 * 作者：m鹏h
 * 时间；2024/6/25 21:49
 * 描述：咖啡装饰器
 **/
public abstract class CoffeeDecorator implements Coffee {
 protected final Coffee decoratedCoffee;

 public CoffeeDecorator(Coffee coffeeToDecorate) {
  this.decoratedCoffee = coffeeToDecorate;
 }

 @Override
 public double getCost() {
  return decoratedCoffee.getCost();
 }

 @Override
 public String getIngredients() {
  return decoratedCoffee.getIngredients();
 }
}